package com.summer.framework.stream.receiver;


import com.summer.framework.api.dto.Msg;
import com.summer.framework.stream.mq.StreamClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * @auther: 杨杰
 * @date: 2019/5/10 09:44
 * @description:
 */
@Component
@EnableBinding({StreamClient.class})
@Slf4j
public class UserReceiver {
/*

    @StreamListener(StreamClient.INPUT)
    public void receiver1(Msg msg, @Header("version") String version){
        log.info("receiver1 接收到消息："+msg.toString()+",version:"+version);
    }
*/


    @StreamListener(StreamClient.INPUT)
    public void receiver1(Msg msg) {
        log.info("receiver1 接收到消息：" + msg.toString());
    }
}
